#ifndef PM_DLG_NEW_TASK_H_INCLUDED
#define PM_DLG_NEW_TASK_H_INCLUDED

#include "dlgedittaskgui.h"
#include "pm/task.h"

/**
 * \class DlgEditTask
 */
class DlgEditTask : public DlgEditTaskGui
{
protected:
	pm::Task m_task;
	bool     m_bInWizardNewProject;
	
	static double m_lastUnitCost;

public:
	DlgEditTask(wxWindow* parent, const wxString& title, bool inWizardNewProject = false);

	const pm::Task& GetTask() const { return m_task; }
	
protected:
	virtual bool Submit() = 0;

	virtual void OnSubmit( wxCommandEvent& event );
};

/**
 * \class DlgNewTask
 */
class DlgNewTask : public DlgEditTask
{
public:
	DlgNewTask(wxWindow* parent, bool inWizardNewProject = false);
	
protected:
	virtual bool Submit();
};

/**
 * \class DlgUpdateTask
 */
class DlgUpdateTask : public DlgEditTask
{
public:
	DlgUpdateTask(wxWindow* parent, const pm::Task& task, bool inWizardNewProject = false);
	
protected:
	virtual bool Submit();
};

#endif // PM_DLG_NEW_TASK_H_INCLUDED
